﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.IO;
using System.Windows.Forms;
namespace sharpCmd
{
    public static class Util
    {
        public delegate void DriveChangedDelegate(string drive);
        public delegate void PathChangedDelegate(object sender, string path);

        public static string GetExtension(this FileInfo fi)
        {
            if (fi.Extension.Length == 0)
                return string.Empty;
            else 
                return fi.Extension.Substring(1);
        }

        public static bool Is(this KeyEventArgs e, Keys key)
        {
            return (e.KeyCode ^ key) == 0;
        }
    }
}
